<?php require_once $_SERVER['DOCUMENT_ROOT'] . '/accHestia/src/svr/userManage/userMisc.php'; ?>

<script src="/accHestia/src/view/js/rpc.js"></script>
<div style="float:right; margin-right:10px; margin-top:5px">
    <div style="float:right;">soft version:1.0</div><br/>
    <div style="float:right;">db version:0.8</div><br/>
    <div style="float:right;" id="id_show_jq_version">jq version:</div><br/>
    <div style="float:right;" id="id_show_jqgrid_version">$.jgrid.version:5.3.2</div><br/>
</div>
<h2>welcome <?php echo get_user_name_by_loginId($_SESSION["loginedId"]);?> </h2>
<button id="logout">退出登录</button>

<script type="text/javascript">
    function logout_callback(ps_data) {
        if ("OK" == ps_data["result"]) {
            window.location = '/accHestia/index.php';
        } else {
            alert("logout NG");
        }
    }

    $(document).ready(function(){
        $("#id_show_jq_version").text("jq version:" + $().jquery);
        $("#logout").click(function(){
            call_rpc("logout", {}, logout_callback);
        });
    });
</script>